<h1>Listing weblogs</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>User</th>
  </tr>
  
<% for weblog in @weblogs %>
  <tr>
    <td><%=h weblog.name %></td>
    <td><%=h weblog.description %></td>
    <td><%= link_to 'Show', weblog_path(weblog) %></td>
    <td><%= link_to 'Edit', edit_weblog_path(weblog) %></td>
    <td><%= link_to 'Destroy', weblog_path(weblog), :confirm => 'Are you sure?', :method => :delete %></td>
    <td><%= link_to 'New Article', :controller => :articles, :action => :new, :id => weblog.id %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New weblog', new_weblog_path %>
